<?php
defined('_JEXEC') or die('Restricted access');

/**
 * Description of Logger
 *
 * @todo 
 * 
 * @author George Zeakis<zeageorge@google.com>
 */
class Logger {
    
    /**
     *
     * @var Logger
     */
    protected static $_instance = NULL;
    
    /**
     * 
     * @return Logger
     */
    public static function Init(){
        if( self::$_instance === NULL ) {
            self::$_instance = new self();
            self::$_instance->_config = $c->pfp->logger->toArray();
            self::$_instance->_events = array(
                'event_onStart'=>'event_onStart',
                'event_Before_Log'=>'event_Before_Log',
                'event_After_Log'=>'event_After_Log',
            );
            eventManager::registerEvents(self::$_instance->_events);
        }
        return self::$_instance;
    }
    
    /**
     * 
     * @param array $msg
     * @return boolean|null
     */
    public static function log(array $msg){
        if( self::$_instance === NULL ) { return FALSE; }
        $m = $msg;

        return TRUE;
    }

    /**
     * we don't permit an explicit call of the constructor! (like $v = new Singleton()) 
     */
    protected function __construct(){}
 
    /**
     * 
     */
    protected function __clone(){}
    
}
?>
